﻿@model IEnumerable<SoftHotel.Models.ReservaEv>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Reserva de Eventos</h2>
@using (Html.BeginForm("Create","ReservaEv",FormMethod.Get))
{<p>
    <input type="submit" name="nuevo2" value="Nuevo" />
      
</p> }

<table width="100%" rules="all" border="1" style="border-color: Black; width: 900px; margin-bottom: 0px;">
    <tr align="center">
        <th>
            Número de Reserva
        </th>
      
        <th>
            Nombre/Razón Social
        </th>
        
        <th>
            Fecha de Reserva
        </th>
        
        <th>
            Estado
        </th>
        <th>
            Monto Total
        </th>
        <th width="60px"></th>
    </tr>

@foreach (var item in Model)
{
    <tr align="center">
        <td>
            
            @Html.ActionLink(@item.numeroReserva, "Details", new { idReserva = item.idReserva }, 1)
        </td>
        
        <td>
            @Html.DisplayFor(modelItem => item.nombreRazonSocial)
        </td>
       
        <td>
            @Html.DisplayFor(modelItem => item.fechaCreacion)
        </td>
       
        <td>
            @Html.DisplayFor(modelItem => item.nomEstado)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.total)
        </td>
        <td>
             <div  style="float:left">
            @using (Html.BeginForm("Edit", "ReservaEv", new { id = item.idReserva }, FormMethod.Get))
            {  <input type="image"  alt="0" title="Editar"  src="/Content/Images/edit.jpg" />
            }
        </div>

          
           <div  style="float:right">
           @using (Html.BeginForm("Invitados", "ReservaEv", null, FormMethod.Get))
           { 
                <input data-val="true" data-val-number="The field idReserva must be a number." data-val-required="El campo idReserva es obligatorio." id="idReserva" name="idReserva" type="hidden" value="@item.idReserva" />
               <input type="image"  alt="0" title="Invitados"  src="/Content/Images/invitados.jpg" height="24" width="24" />
           }
           </div>
        </td>
    </tr>
}

</table>


@using (Html.BeginForm("Search", "ReservaEv", FormMethod.Get))
{<p>
    <input type="submit" name="nuevo2" value="Volver" />
      
</p> }

